<template>
  <el-alert class="page-tools" :closable="false" type="info">
    <el-row align="middle">
      <el-col>
        <div v-if="showBefore" class="before">
          <i class="el-icon-info" />
          <!-- 定义前面得插槽 -->
          <slot name="before" />
        </div>
      </el-col>
      <el-col>
        <el-row type="flex" justify="end">
          <!-- 定义后面的插槽 -->
          <slot name="after" />
        </el-row>
      </el-col>
    </el-row>
  </el-alert>
</template>

<script>
export default {
  name: 'PageTool',
  // 组件
  components: {},
  props: {
    showBefore: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {}
  },
  // 计算属性
  computed: {},
  // 侦听
  watch: {},
  created () { },
  mounted () { },
  methods: {}
}
</script>

<style scoped lang='scss'>
.page-tools {
  display: flex;
  align-content: center;
  height: 34.8px;
  margin: 10px 0;

  .before {

    font-size: 13px;
    height: 24px;
    // line-height: 24px;

    i {
      font-size: 16px;
      margin-right: 5px;
      // color: #409eff;
    }

    display: inline-block;
    padding: 0px 10px 0 0;
    border-radius: 3px;
    // border: 1px solid rgba(145, 213, 255, 1);
    // background: rgba(230, 247, 255, 1);
  }
}
</style>
